package com.mxpio.erp.common.oa.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_REIMBURSE_INVOICE_LINE")
@Schema(description="报销发票")
public class ReimburseInvoiceLine extends BaseEntity {

    private static final long serialVersionUID = 1L;
    @Id
    @Generator
    @Schema(description = "id")
    @Column(name = "id", length = 64)
    private String id;

    @Column(name = "BIZ_NO_")
    @Schema(description = "发票主单单号")
    private String bizNo;

    @Column(name = "SORT_")
    @Schema(description = "顺序号")
    private String sort;

    @Column(name = "ITEM_CODE_")
    @Schema(description = "项目名称")
    private String projectName;

    @Column(name = "QUANTITY_")
    @Schema(description = "数量")
    private BigDecimal quantity;

    @Column(name = "UNTAX_PRICE_")
    @Schema(description = "无税单价")
    private BigDecimal untaxPrice;

    @Column(name = "TAX_PRICE_")
    @Schema(description = "含税单价")
    private BigDecimal taxPrice;

    @Column(name = "TAX_RATE_")
    @Schema(description = "税率")
    private BigDecimal taxRate ;

    @Column(name = "TAX_")
    @Schema(description = "税额")
    private BigDecimal tax;

    @Column(name = "TOTAL_AMOUNT")
    @Schema(description = "价税合计")
    private BigDecimal totalAmount;

    @Column(name = "MEMO_")
    @Schema(description = "备注")
    private String memo;

    @Transient
    private ReimburseInvoice reimburseInvoice;

//    @Transient
//    private BigDecimal checkMMoney;//已勾稽金额
//    @Transient
//    private BigDecimal uncheckMoney;;//未勾稽金额
}
